package SV_SENSITIVE_OBJ;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.io.OutputStream;
public class Vulnerable_02 {

    public class Writer {
        public void writePatientInfo(OutputStream os, Patient patient) throws IOException
        {
            try (ObjectOutputStream oos = new ObjectOutputStream(os)) {
                oos.writeObject(patient);
            }
        }
        public static class Patient {
            public String getName() { return "John Doe"; }
            public String getDob() { return "1900-01-01"; }
            public String getAddress() { return "123 Main St., Cityville, NY 12345"; }
        }
    }
}
